<?php

use Illuminate\Database\Seeder;

class KeyWordAndArticle extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('keyWord') -> insert([
            [
                'keyWord' => '芳华'
            ],[
                'keyWord' => '冯小刚'
            ],[
                'keyWord' => '老炮儿'
            ],[
                'keyWord' => '导演'
            ]
        ]);

        DB::table('relation') -> insert([
            [
                'article_id' => rand(1,3),
                'key_id'    => rand(1,4)
            ], [
                'article_id' => rand(1,3),
                'key_id'    => rand(1,4)
            ], [
                'article_id' => rand(1,3),
                'key_id'    => rand(1,4)
            ], [
                'article_id' => rand(1,3),
                'key_id'    => rand(1,4)
            ],
        ]);
    }
}
